package com.softa.service.system;

import java.util.List;
import java.util.Set;

import com.github.pagehelper.PageInfo;
import com.softa.bean.DataGridModel;
import com.softa.dao.model.SysResource;
import com.softa.dao.model.SysRole;
import com.softa.vo.DataGridRequest;
import com.softa.vo.QueryRequest;

/**
* @ClassName: RoleService
* @Description: TODO
* @author yangl
* @date 2015-6-3 下午1:08:54
*
 */
public interface RoleService {


	String createRole(SysRole role);
	String updateRole(SysRole role);
    void deleteRole(Long roleId);

    SysRole findOne(Long roleId);
    SysRole findOne(String code);
    List<SysRole> findAll();

    /**
     * 根据角色编号得到角色标识符列表
     * @param roleIds
     * @return
     */
    Set<String> findRoles(String... roleIds);

    /**
     * 根据角色编号得到权限字符串列表
     * @param roleIds
     * @return
     */
    Set<String> findPermissions(String[] roleIds);
    PageInfo<SysRole> queryRoleByParam(DataGridRequest request, final QueryRequest queryRequest);
	Long queryRoleTotalByParam(DataGridModel dataGrid);
	/**
     * 根据角色编号得到菜单列表
     * @param roleIds
     * @return
     */
	List<SysResource> findResourceList(String[] roleIds);

    Set<String> findAllRoles();
}
